package sv.gob.mh.dgii.model;

// Generated Dec 10, 2007 4:52:21 PM by Hibernate Tools 3.2.0.beta7

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CgEstAvan generated by hbm2java
 */
@Entity
@Table(name = "CG_EST_AVAN", schema = "UPET", uniqueConstraints = {})
public class CgEstAvan implements java.io.Serializable {

	// Fields    

	/**
	 * 
	 */
	private static final long serialVersionUID = -2288935006678732665L;

	private Long nestAvance;

	private CgTecnico cgTecnico;

	private CgEtapa cgEtapa;

	private CgCaso cgCaso;

	private TbUnidad tbUnidad;

	private Date fiestado;

	private Date ffestado;

	private String mestado;

	private String crol;

	private Double ntotalHoras;

	private String cusuario;

	private Date fhingreso;

	private Date fhmodificacion;

	private Integer bingresoExtra;

	private Set<CgEstAvanDet> cgEstAvanDets = new HashSet<CgEstAvanDet>(0);

	// Constructors

	/** default constructor */
	public CgEstAvan() {
	}

	/** minimal constructor */
	public CgEstAvan(Long nestAvance, CgTecnico cgTecnico, CgEtapa cgEtapa,
			CgCaso cgCaso, TbUnidad tbUnidad, Date fiestado, Date ffestado,
			String mestado, String crol, Double ntotalHoras, String cusuario,
			Date fhingreso, Date fhmodificacion, Integer bingresoExtra) {
		this.nestAvance = nestAvance;
		this.cgTecnico = cgTecnico;
		this.cgEtapa = cgEtapa;
		this.cgCaso = cgCaso;
		this.tbUnidad = tbUnidad;
		this.fiestado = fiestado;
		this.ffestado = ffestado;
		this.mestado = mestado;
		this.crol = crol;
		this.ntotalHoras = ntotalHoras;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
		this.bingresoExtra = bingresoExtra;
	}

	/** full constructor */
	public CgEstAvan(Long nestAvance, CgTecnico cgTecnico, CgEtapa cgEtapa,
			CgCaso cgCaso, TbUnidad tbUnidad, Date fiestado, Date ffestado,
			String mestado, String crol, Double ntotalHoras, String cusuario,
			Date fhingreso, Date fhmodificacion, Integer bingresoExtra,
			Set<CgEstAvanDet> cgEstAvanDets) {
		this.nestAvance = nestAvance;
		this.cgTecnico = cgTecnico;
		this.cgEtapa = cgEtapa;
		this.cgCaso = cgCaso;
		this.tbUnidad = tbUnidad;
		this.fiestado = fiestado;
		this.ffestado = ffestado;
		this.mestado = mestado;
		this.crol = crol;
		this.ntotalHoras = ntotalHoras;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
		this.bingresoExtra = bingresoExtra;
		this.cgEstAvanDets = cgEstAvanDets;
	}

	// Property accessors
	@Id
	@Column(name = "N_EST_AVANCE", unique = true, nullable = false, insertable = true, updatable = true, precision = 10, scale = 0)
	public Long getNestAvance() {
		return this.nestAvance;
	}

	public void setNestAvance(Long nestAvance) {
		this.nestAvance = nestAvance;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT_AUDITOR", unique = false, nullable = false, insertable = true, updatable = true)
	public CgTecnico getCgTecnico() {
		return this.cgTecnico;
	}

	public void setCgTecnico(CgTecnico cgTecnico) {
		this.cgTecnico = cgTecnico;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "C_ETAPA", unique = false, nullable = false, insertable = true, updatable = true)
	public CgEtapa getCgEtapa() {
		return this.cgEtapa;
	}

	public void setCgEtapa(CgEtapa cgEtapa) {
		this.cgEtapa = cgEtapa;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "N_CASO", unique = false, nullable = false, insertable = true, updatable = true)
	public CgCaso getCgCaso() {
		return this.cgCaso;
	}

	public void setCgCaso(CgCaso cgCaso) {
		this.cgCaso = cgCaso;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "C_UNIDAD", unique = false, nullable = false, insertable = true, updatable = true)
	public TbUnidad getTbUnidad() {
		return this.tbUnidad;
	}

	public void setTbUnidad(TbUnidad tbUnidad) {
		this.tbUnidad = tbUnidad;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FI_ESTADO", unique = false, nullable = false, insertable = true, updatable = true, length = 7)
	public Date getFiestado() {
		return this.fiestado;
	}

	public void setFiestado(Date fiestado) {
		this.fiestado = fiestado;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FF_ESTADO", unique = false, nullable = false, insertable = true, updatable = true, length = 7)
	public Date getFfestado() {
		return this.ffestado;
	}

	public void setFfestado(Date ffestado) {
		this.ffestado = ffestado;
	}

	@Column(name = "M_ESTADO", unique = false, nullable = false, insertable = true, updatable = true, length = 1)
	public String getMestado() {
		return this.mestado;
	}

	public void setMestado(String mestado) {
		this.mestado = mestado;
	}

	@Column(name = "C_ROL", unique = false, nullable = false, insertable = true, updatable = true, length = 2)
	public String getCrol() {
		return this.crol;
	}

	public void setCrol(String crol) {
		this.crol = crol;
	}

	@Column(name = "N_TOTAL_HORAS", unique = false, nullable = false, insertable = true, updatable = true, precision = 5)
	public Double getNtotalHoras() {
		return this.ntotalHoras;
	}

	public void setNtotalHoras(Double ntotalHoras) {
		this.ntotalHoras = ntotalHoras;
	}

	@Column(name = "C_USUARIO", unique = false, nullable = false, insertable = true, updatable = true, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", unique = false, nullable = false, insertable = true, updatable = true, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_MODIFICACION", unique = false, nullable = false, insertable = true, updatable = true, length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

	@Column(name = "B_INGRESO_EXTRA", unique = false, nullable = false, insertable = true, updatable = true, precision = 1, scale = 0)
	public Integer getBingresoExtra() {
		return this.bingresoExtra;
	}

	public void setBingresoExtra(Integer bingresoExtra) {
		this.bingresoExtra = bingresoExtra;
	}

	@OneToMany( fetch = FetchType.LAZY, mappedBy = "cgEstAvan")
	public Set<CgEstAvanDet> getCgEstAvanDets() {
		return this.cgEstAvanDets;
	}

	public void setCgEstAvanDets(Set<CgEstAvanDet> cgEstAvanDets) {
		this.cgEstAvanDets = cgEstAvanDets;
	}

}
